package com.android.bookgarden.ui;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.android.bookgarden.R;
import com.android.bookgarden.base.BaseActivity;

import butterknife.BindView;

/**密码设置身份验证
 * Create by zouqh
 * on 2018/12/4
 **/
public class SettingPayPassActivity extends BaseActivity implements View.OnClickListener {
    @BindView(R.id.cancel)
    TextView cancel;
    @BindView(R.id.inputPhone)
    EditText inputPhone;
    @BindView(R.id.inputCode)
    EditText inputCode;
    @BindView(R.id.SendCode)
    TextView SendCode;
    @BindView(R.id.next)
    TextView next;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_setting_paypassword;
    }

    @Override
    protected void initView() {

        cancel.setOnClickListener(this);
        next.setOnClickListener(this);
        SendCode.setOnClickListener(this);
    }

    @Override
    public void onRequestPermissions(String str, boolean z) {

    }

    @Override
    public void onClick(View v) {

        switch (v.getId()){
            case R.id.cancel:
                finish();
                break;

            case R.id.next:
                startActivity(InputPayPassWordActivity.class);
                break;

            case R.id.SendCode:
                sendMsg();
                break;
        }
    }

    private void sendMsg(){
        String phone = inputPhone.getText().toString();
        if (TextUtils.isEmpty(phone)){
            showToast("请输入手机号");
        }else if (phone.length()!=11){
            showToast("请输入11位手机号");
        }else{

        }
    }


}
